#include<iostream>

using namespace std;

struct Grade{
    float chinese;
    float math;
    float english;
};

void addsum(Grade student[],int sum[10]){
    int i;
    for(i=0;i<10;i++){
        sum[i]=student[i].chinese+student[i].math+student[i].english;
    }
    
}

void average(Grade student[]){
    float chinese=0,math=0,english=0;int i;
    for(i=0;i<10;i++){
        chinese+=student[i].chinese;
        math+=student[i].math;
        english+=student[i].english;
    }
    chinese=chinese/10;
    math=math/10;
    english=english/10;
    cout<<chinese<<endl<<math<<endl<<english<<endl;
    
}

void max_min(Grade student[],int sum[10]){
    int i;float max=0.0,min=1000;
    //sum[10]=addsum(student);
    for(i=0;i<10;i++){
        if(max<sum[i])
        {
            max=sum[i];
        }
        if(min>sum[i])
        {
            min=sum[i];
        }
    }
    int x,y;
    for(i=0;i<10;i++){
        if(sum[i]==max)
            x=i;
        if(sum[i]==min)
            y=i;
    }
    cout<<"student"<<x<<endl<<"student"<<y<<endl;
    
}

int main(){
    float sum1,sum2,sum3;
    int sum[10];
    float chinese,math,english;
    int x,y;
    Grade student[10];int i;
    for(i=0;i<10;i++){
        student[i].chinese=1+i;
        student[i].math=2+i;
        student[i].english=3+i;
    }
    addsum(student,sum);

    for(i=0;i<10;i++){
        cout<<sum[i]<<endl;
    
    }
    average(student);
    
    max_min(student,sum);
}